package com.wyc.mapper;


import com.wyc.pojo.Dept;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DeptsMapper {
    //查询所有部门
    @Select("select * from depts")
    public List<Dept> selectAllDepts();

    //删除部门
    @Delete("delete from depts where id=#{id}")
    public void deleteById(Integer id);

    //添加部门
    @Insert("insert into depts values (null,#{name},#{createTime},#{updateTime})")
    public void add(Dept dept);

}
